#pragma once

#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>

#define M_PI       3.14159265358979323846
//#define M_E        2.71828182845904523536

typedef enum{
		EOBJTYPE_WATER=0,
		EOBJTYPE_FOOD,
		EOBJTYPE_CREATURE,
		EOBJTYPE_ALL
}EOBJTYPE;

typedef enum{
	DIR_UP=0,
	DIR_LEFT,
	DIR_RIGHT,
	DIR_DOWN,
	DIR_NONE
}DIRECTION;

typedef enum{
		RES_COMMON,
		RES_GOOD,
		RES_BAD,
}RESULT_JUDGMENT;

#define ALL_DIRECTION_COUNT (DIR_NONE)

#define MAX_CASE 81 //((int) pow( (float)EOBJTYPE_ALL , (int)(ALL_DIRECTION_COUNT)))

#ifndef TRACE
#define TRACE printf
#endif

#define DEFAULT_ANGLE_WATER (5.0/180.0*M_PI)
#define DEFAULT_ANGLE_FOOD (90.0/180.0*M_PI)
#define DEFAULT_ANGLE_CREATURE (-90.0/180.0*M_PI)

//#define ANGLE_DIR_UP 15.0
//#define ANGLE_DIR_LEFT 45.0
//#define ANGLE_DIR_RIGHT 75.0
//#define ANGLE_DIR_DOWN 105.0
//#define ANGLEDIR_NONE 135.0

//#define ANGLE_DIR_UP 7.043529
//#define ANGLE_DIR_LEFT 1.791592
//#define ANGLE_DIR_RIGHT -1.610534
//#define ANGLE_DIR_DOWN -6.641157
/*
#define ANGLE_DIR_DOWN -4.502946
#define ANGLE_DIR_RIGHT 0.438268
#define ANGLE_DIR_LEFT 1.407835
#define ANGLE_DIR_UP  6.710229
*/
/*
#define ANGLE_DIR_DOWN -11.159585
#define ANGLE_DIR_RIGHT -1.630183
#define ANGLE_DIR_LEFT 3.978805
#define ANGLE_DIR_UP 36.294073
*/

#define ANGLE_DIR_DOWN -3.1
#define ANGLE_DIR_RIGHT 0
#define ANGLE_DIR_LEFT 4
#define ANGLE_DIR_UP  36


#define NERVUS_COUNT 5
#define NERVUS_CHAIN_COUNT 3
#define NERVUS_SIGNAL_COUNT (NERVUS_CHAIN_COUNT+1)

//#define DEFAULT_ANGLE_NERVUS (65.0/180.0*M_PI)
